import Login from '@/template/login/index.vue'
import { LOGIN, HOME, REGISTER, FIND_PASSWORD, QUESTION } from './routeMap'

const routes = [
  { path: '/login', component: Login, name: LOGIN.name },
  { path: '/register', component: () => import('@/template/register/index.vue'), name: REGISTER.name },
  { path: '/findPassword', component: () => import('@/template/findPassword/index.vue'), name: FIND_PASSWORD.name },
  { path: '/question/:questionId', component: () => import('@/template/question/index.vue'), name: QUESTION.name },
  { path: '/', component: () => import('@/template/home/index.vue'), name: HOME.name },
  { path: '/:pathMatch(.*)*', redirect: '/' },
]

export default routes